package com.lanmaoly.cunzheng;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class SocketTest {

    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("localhost", 8080);
        OutputStream stream = socket.getOutputStream();
        stream.write("hello world".getBytes());
        stream.close();
        socket.close();
    }

}
